﻿using System;
using Fuse8.DomainFramework.Domain;

namespace Fuse8.ContentManagementFramework.Domain
{
    /// <summary>
    /// Provides contract for strong type content item
    /// </summary>
    public interface IContentItem
    {
        int PublicContentId { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public abstract class DefaultContentItem : Int32EntityObject, IContentItem, ITrackingEntityObject, IDeletableEntity, IRevisionEntity
    {
        public virtual int PublicContentId { get; set; }

        public virtual string ContentTitle { get; set; }

        public virtual string ContentSummary { get; set; }

        public virtual string ContentBody { get; set; }

        public virtual string ContentCode { get; set; }

        public virtual int? SystemLanguageId { get; set; }

        public DateTime? PublishStartDate { get; set; }

        public DateTime? PublishEndDate { get; set; }

        public bool IsPublished { get; set; }

        public virtual int? SiteGroupId { get; set; }

        public virtual int? SiteId { get; set; }

        public int CreatedBy { get; set; }

        public DateTime DateCreated { get; set; }

        public int? LastUpdatedBy { get; set; }

        public DateTime? DateLastUpdated { get; set; }

        public CmsUser CreatedByUser { get; set; }

        public CmsUser LastUpdatedByUser { get; set; }

        public virtual bool IsDeleted { get; set; }
        public virtual bool IsLatestRevision { get; set; }
        public virtual bool IsLatestCompletedRevision { get; set; }
    }
}